<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <p>
      For a guide and recipes on how to configure / customize this project,<br>
      check out the
      <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
    </p>
    <h3>Installed CLI Plugins</h3>
    <button @click="change()">change</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  data() {
    return {
      'theme': 'theme2'
    }
  },
  methods: {
    change(){
      console.log(this.theme)
      // console.log(this.$themeSetup)
      
      // this.$store.commit("increment", this.theme);
      // import('../assets/scss/'+ this.theme+'/totals.scss')
      if (this.theme == 'theme1') {
        // this.$themeSetup(this.theme)
        document.getElementsByTagName('body')[0].className = this.theme
        this.theme = 'theme2'
      }else {
        // this.$themeSetup(this.theme)
        document.getElementsByTagName('body')[0].className = this.theme
        this.theme = 'theme1'
      }
    }
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
  // @import '../assets/scss/theme1/totals.scss'
</style>
